package com.yj.rocketmq;


import com.yj.core.result.IExceptionMsg;

/**
 * 异常消息
 *
 * @author Xie
 * @date 19-3-19
 */
public enum RocketMqExceptionMsg implements IExceptionMsg {

    SEND_MESSAGE_FAIL(70001, "RocketMq发送消息失败"),
    SEND_MESSAGE_EXCEPTION(70002, "系统异常，发送消息失败"),
    API_NOT_SUPPORT(70003, "AliRocketMq不支持延迟消息"),
    TOPIC_NOT_NULL(70004, "消息topic不能为空"),
    KEY_NOT_NULL(70005, "唯一键key不能为空"),
    BODY_NOT_NULL(70006, "消息体不能为空"),
    MSG_ID_NOT_NULL(70007, "消息Id不能为空"),
    PARAM_IS_NULL(70008, "参数为空"),
    TAG_NOT_NULL(70009, "标签不能为空"),
    UNKNOWN_SERVICE(70010, "未找到执行发送方法"),
    DELAY_LEVEL_ERROR(70011, "消息延迟级别错误"),
    PRODUCER_HANDLE_NULL(70012,"producer 为null,不能发送mq消息"),
    HOS_MORE_ONE(70013,"本地医院配置有误！"),
    PRODUCER_PARAM_CFG_INVALID(70014,"DefaultMQProducer参数配置有误"),
    PRODUCER_START_FAILED(70014,"DefaultMQProducer启动失败"),
    CONSUMER_PARAM_CFG_INVALID(70015,"DefaultMQPushConsumer参数配置有误"),
    CONSUMER_START_INVALID(70016,"DefaultMQPushConsumer启动有误"),
    ;

    private Integer code;
    private String message;

    RocketMqExceptionMsg(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
